"""PerformanceCalculation URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from backend import views
from backend.controller import project, performance, user, argument, service, research, achievement

urlpatterns = [

    path('', views.index),

    # 用户相关
    path('user/index', user.index),
    path('user/save', user.save),
    path('user/login', user.login),
    path('user/logout', user.log_out),
    path('user/info', user.user_info),
    path('user/list', user.user_list),
    path('user/all/list', user.user_all),
    path('user/head/list', user.head_users),
    path('user/input/save', user.user_save_input),
    path('admin/', admin.site.urls),

    # 项目相关
    path('project/get', project.get),
    path('project/list', project.project_list),
    path('project/list/user', project.get_performance_of_project),
    path('project/save', project.save),
    path('project/delete', project.delete),

    # 项目第一项绩效
    path('performance/save', performance.save),
    path('performance/get/user', performance.get_by_user),
    path('performance/get/project', performance.get_by_project),

    # 项目第二项绩效
    path('achievement/save', achievement.save),
    path('achievement/get/user', achievement.get_by_user),
    path('achievement/get/project', achievement.get_by_project),

    # 论证编制
    path('argument/save', argument.save),
    path('argument/list', argument.get_list),
    path('argument/list/detail', argument.get_by_project_detail),
    path('argument/get/user', argument.get_by_user),
    path('argument/get/project', argument.get_by_project),

    # 公共服务
    path('service/save', service.save),
    path('service/get/user', service.get_by_user),

    # 科研成果
    path('research/save', research.save),
    path('research/get/user', research.get_by_user),

]
